package tests.flexunit.utils
{
	import flexunit.framework.TestCase;
	
	import mx.core.Application;
	
	import sv.utils.ClassUtil;
	
	public class GetQualifiedClassNameTests extends TestCase
	{
		
		
		public function GetQualifiedClassNameTests( methodName:String = null )
		{
			super(methodName);
		}
		
		
//------------------------------------------------------------------------------
		
		public function testGetNameByInstance() : void
		{
			assertEquals( "mx.core::Application", ClassUtil.getQualifiedClassName(new Application()) );
		}
		
//------------------------------------------------------------------------------
		
		public function testGetNameByClass() : void
		{
			assertEquals( "mx.core::Application", ClassUtil.getQualifiedClassName(Application));
		}

//------------------------------------------------------------------------------
		
		public function testGetNameByBaseInstance() : void
		{
			assertEquals( "Object", ClassUtil.getQualifiedClassName(new Object()) );
		}

//------------------------------------------------------------------------------
		
		public function testGetNameByBaseClass() : void
		{
			assertEquals( "Object", ClassUtil.getQualifiedClassName(Object) );
		}
		
//------------------------------------------------------------------------------
		
		public function testGetNameByPrimitiveInstance() : void
		{
			assertEquals( "Boolean", ClassUtil.getQualifiedClassName(true) );
		}
		
//------------------------------------------------------------------------------
		
		public function testGetNameByPrimitiveClass() : void
		{
			assertEquals( "Boolean", ClassUtil.getQualifiedClassName(Boolean) );
		}
		
//------------------------------------------------------------------------------
		
		public function testGetNameHandleNull() : void
		{
			assertEquals( "null", ClassUtil.getQualifiedClassName(null) );
		}
		
//------------------------------------------------------------------------------
		
		public function testGetNameHandleUndefined() : void
		{
			assertEquals( "void", ClassUtil.getQualifiedClassName(undefined) );
		}
		
//------------------------------------------------------------------------------
		
		public function testGetNameHandleVoid() : void
		{
			assertEquals( "void", ClassUtil.getQualifiedClassName(void) );
		}
		
//------------------------------------------------------------------------------
	
	}
	
}
